package com.ruoyi.leave.service;

import com.ruoyi.leave.domain.WorkflowWaterPlan;
import com.ruoyi.manage.domain.dto.Plan;

import java.util.List;

/**
 * 用水申请Service接口
 *
 * @author ruoyi
 * @date 2023-12-22
 */
public interface IWorkflowWaterPlanService {
    /**
     * 查询用水申请
     *
     * @param id 用水申请ID
     * @return 用水申请
     */
    public WorkflowWaterPlan selectWorkflowWaterPlanById(String id);

    /**
     * 查询用水申请列表
     *
     * @param workflowWaterPlan 用水申请
     * @return 用水申请集合
     */
    public List<WorkflowWaterPlan> selectWorkflowWaterPlanList(WorkflowWaterPlan workflowWaterPlan);

    /**
     * 新增用水申请
     *
     * @param workflowWaterPlan 用水申请
     * @return 结果
     */
    public int insertWorkflowWaterPlan(WorkflowWaterPlan workflowWaterPlan);

    /**
     * 修改用水申请
     *
     * @param workflowWaterPlan 用水申请
     * @return 结果
     */
    public int updateWorkflowWaterPlan(WorkflowWaterPlan workflowWaterPlan);

    /**
     * 批量删除用水申请
     *
     * @param ids 需要删除的用水申请ID
     * @return 结果
     */
    public int deleteWorkflowWaterPlanByIds(String[] ids);

    /**
     * 删除用水申请信息
     *
     * @param id 用水申请ID
     * @return 结果
     */
    public int deleteWorkflowWaterPlanById(String id);

    /**
     * 用水户提交审批
     *
     * @param plan
     * @return
     */
    int updatePlanSP(Plan plan);

    /**
     * 拾取任务
     *
     * @param workflowWaterPlan
     */
    void claimTask(WorkflowWaterPlan workflowWaterPlan);

    /**
     * 归还任务
     *
     * @param workflowWaterPlan
     */
    void unClaimTask(WorkflowWaterPlan workflowWaterPlan);

    /**
     * 完成任务
     *
     * @param workflowWaterPlan
     */
    void completeTask(WorkflowWaterPlan workflowWaterPlan);

    /**
     * 驳回任务
     *
     * @param workflowWaterPlan
     */
    void rejectTask(WorkflowWaterPlan workflowWaterPlan);


    /**
     * 通过申请
     *
     * @param planId
     * @return
     */
    int completeTaskByPlanID(Long planId);

    /**
     * 驳回申请
     *
     * @param plan
     * @return
     */
    int rejectTaskByPlanID(Plan plan);

    /**
     * 审批
     *
     * @param plan
     * @return
     */
    int examinePlan(Plan plan);

    /**
     * 审批(农业)
     *
     * @param plan
     * @return
     */
    public int examineAgriculturePlan(Plan plan);
}
